package com.ctgu.j08.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ctgu.j08.vo.Device;
import com.ctgu.j08.vo.Result;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @version 1.0
 * @author: Saiya Wang
 * @date: 2021/5/29 15:31
 */
@Service
public interface DeviceService extends IService<Device> {
    /**
     * 通过id获取设备
     * @param deId
     * @return
     */
    public Device getById(int deId);

    /**
     * 通过设备名称获取设备
     * @param deName
     * @return
     */
    public List<Device> getByDeName(String deName);

    /**
     * 更新设备信息
     * @param device
     * @return
     */
    public Result editDevice(Device device);

    /**
     * 添加设备
     * @param device
     * @return
     */
    public Result addDevice(Device device);

    /**
     * 通过id删除设备
     * @param deId
     * @return
     */
    public Result delDevice(Integer deId);

    /**
     *
     * @return
     */
    public Result getAllDeviceInfo();

    /**
     * 用户名查找设备
     * @param deName
     * @return
     */
    public Result searchDeviceByName(String deName);
}
